<template>
  <div id="app">
    <!-- <img src="./assets/logo.png"> -->
    <router-view v-if="!isDevtoolsOpen"/>
    <div class="tips" v-else>本页面仅供效果预览，不得使用开发者工具进行页面分析</div>
  </div>
</template>

<script>
// doc: https://github.com/AepKill/devtools-detector
import { addListener , launch } from 'devtools-detector'
export default {
  name: 'App',
  data () {
    return {
      isDevtoolsOpen: false
    } 
  },
  created () {
    // 1. add listener
    addListener(status => {
      this.isDevtoolsOpen = status
    })
    // 2. launch detect
    launch()
  }
} 
</script>

<style>
#app {
  font-family: 'Avenir', Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  margin-top: 60px;
  font-size: 14px;
}
html, body, #app {
  margin: 0;
  padding: 0;
  height: 100%;
  height: 100%;
  overflow: hidden;
}
main {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  height: 100%;
  overflow-y: auto;
}
pre {
  width: 100%;
  overflow: auto;
}

.tips {
  margin-top: 35vh;
}
</style>
